package com.hnevc.kaoshitest1;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class NewsDetailActivity extends AppCompatActivity {

    private TextView titleTv;
    private TextView timeArrayTv;
    private TextView contentTv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.news_detail_activity);
        initView();
        initData();
        initEvent();
    }

    private void initView() {
        titleTv = findViewById(R.id.news_title);
        timeArrayTv = findViewById(R.id.news_time);
        contentTv = findViewById(R.id.news_content);
    }

    private void initData() {
        Intent intent = getIntent();
        String titleStr = intent.getStringExtra("title");
        String timeStr = intent.getStringExtra("time");
        String contentStr = intent.getStringExtra("content");
        titleTv.setText(titleStr+"");
        timeArrayTv.setText(timeStr+"");
        contentTv.setText(contentStr+"");

    }

    private void initEvent() {

    }
}
